package com.my.jli.dao;

import com.my.jli.entity.MyFile;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Set;

/**
 * @ClassName MyFileRepository
 * @Description
 * @Author MaYu
 * @Date 2022/3/26 9:30
 * @Version 1.0
 **/
public interface MyFileRepository extends JpaRepository<MyFile, Integer> {
    //根据审核状态获取文件对象
    List<MyFile> findByJurisdiction(int jurisdiction);
    Page<MyFile> findByJurisdiction(int jurisdiction, Pageable pageable);

    @Query("select distinct type from tb_file ")
    Set<String> findAllType();

}
